using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

using Peradigm.Framework.Domain.Security;
using Peradigm.Framework.Persistence;

using Liberty.Domain.CaseManagement;
using Liberty.Domain.GrantManagement;
using Liberty.Domain.NoteManagement;
using Liberty.Domain.ServiceMemberManagement;

namespace Liberty.Domain.NoteManagement
{
    [Serializable]
    public class Note : PersistentModel
    {
        #region Constants
        #endregion

        #region Event Handlers
        #endregion

        #region Methods
        /// <summary>
        /// Creates a stubbed event populated with frequently used primitives.  
        /// Other aggregated objects are not populated by this factory method.
        /// </summary>
        /// <returns></returns>
        public static Note TestInstance()
        {
            Note stub = new Note();
            stub.Oid = 12L;
            stub.Text = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi eu lectus ac sem fringilla varius. Vestibulum quis tellus sed dolor rhoncus gravida. Proin at tortor non orci egestas egestas. In hac habitasse platea dictumst. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nullam posuere. Fusce a elit blandit risus convallis pharetra. Maecenas sapien erat, dignissim vitae, lacinia quis, iaculis facilisis, eros. Nunc sagittis ullamcorper sapien. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nunc egestas rutrum risus. Aenean ut tortor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos.";

            return stub;
        }
        #endregion

        #region Properties

        public User Author
        {
            get
            {
                return i_Author;
            }

        }

        public DateTime? DateCreated
        {
            get
            {
                return i_DateCreated;
            }

        }


        public string Text
        {
            get
            {
                return i_Text;
            }
            set
            {
                i_Text = value;
            }
        }

        #endregion

        #region Private Methods
        #endregion

        #region Private Properties
        #endregion

        #region Construction and Finalization
        private Note()
        {
        }

        public Note( long oid, byte[] version, User author, DateTime dateCreated, string text )
            : base( oid, version )
        {
            i_Author = author;
            i_Text = text;
            i_DateCreated = dateCreated;
        }
        public Note( User author, string text )
        {
            i_Author = author;
            i_Text = text;
            i_DateCreated = DateTime.Now;
        }
        #endregion

        #region Data Elements
        private DateTime? i_DateCreated;
        private User i_Author;
        private string i_Text;

        #endregion
    }
}